using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Data_DataType_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Data.DataType);

            field = type.GetField("String", flag);
            app.RegisterCLRFieldGetter(field, get_String_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_String_0, null);
            field = type.GetField("FakeStruct", flag);
            app.RegisterCLRFieldGetter(field, get_FakeStruct_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_FakeStruct_1, null);
            field = type.GetField("FakeStructArray", flag);
            app.RegisterCLRFieldGetter(field, get_FakeStructArray_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_FakeStructArray_2, null);
            field = type.GetField("ByteArray", flag);
            app.RegisterCLRFieldGetter(field, get_ByteArray_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_ByteArray_3, null);
            field = type.GetField("Int32Array", flag);
            app.RegisterCLRFieldGetter(field, get_Int32Array_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_Int32Array_4, null);
            field = type.GetField("FloatArray", flag);
            app.RegisterCLRFieldGetter(field, get_FloatArray_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_FloatArray_5, null);
            field = type.GetField("Int16Array", flag);
            app.RegisterCLRFieldGetter(field, get_Int16Array_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_Int16Array_6, null);
            field = type.GetField("Int64Array", flag);
            app.RegisterCLRFieldGetter(field, get_Int64Array_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_Int64Array_7, null);
            field = type.GetField("DoubleArray", flag);
            app.RegisterCLRFieldGetter(field, get_DoubleArray_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_DoubleArray_8, null);
            field = type.GetField("FakeStringArray", flag);
            app.RegisterCLRFieldGetter(field, get_FakeStringArray_9);
            app.RegisterCLRFieldBinding(field, CopyToStack_FakeStringArray_9, null);
            field = type.GetField("Int", flag);
            app.RegisterCLRFieldGetter(field, get_Int_10);
            app.RegisterCLRFieldBinding(field, CopyToStack_Int_10, null);
            field = type.GetField("Float", flag);
            app.RegisterCLRFieldGetter(field, get_Float_11);
            app.RegisterCLRFieldBinding(field, CopyToStack_Float_11, null);
            field = type.GetField("Long", flag);
            app.RegisterCLRFieldGetter(field, get_Long_12);
            app.RegisterCLRFieldBinding(field, CopyToStack_Long_12, null);
            field = type.GetField("Double", flag);
            app.RegisterCLRFieldGetter(field, get_Double_13);
            app.RegisterCLRFieldBinding(field, CopyToStack_Double_13, null);
            field = type.GetField("Decimal", flag);
            app.RegisterCLRFieldGetter(field, get_Decimal_14);
            app.RegisterCLRFieldBinding(field, CopyToStack_Decimal_14, null);
            field = type.GetField("Struct", flag);
            app.RegisterCLRFieldGetter(field, get_Struct_15);
            app.RegisterCLRFieldBinding(field, CopyToStack_Struct_15, null);
            field = type.GetField("Class", flag);
            app.RegisterCLRFieldGetter(field, get_Class_16);
            app.RegisterCLRFieldBinding(field, CopyToStack_Class_16, null);
            field = type.GetField("StructArray", flag);
            app.RegisterCLRFieldGetter(field, get_StructArray_17);
            app.RegisterCLRFieldBinding(field, CopyToStack_StructArray_17, null);
            field = type.GetField("ClassArray", flag);
            app.RegisterCLRFieldGetter(field, get_ClassArray_18);
            app.RegisterCLRFieldBinding(field, CopyToStack_ClassArray_18, null);
            field = type.GetField("TwoDArray", flag);
            app.RegisterCLRFieldGetter(field, get_TwoDArray_19);
            app.RegisterCLRFieldBinding(field, CopyToStack_TwoDArray_19, null);
            field = type.GetField("TwoDList", flag);
            app.RegisterCLRFieldGetter(field, get_TwoDList_20);
            app.RegisterCLRFieldBinding(field, CopyToStack_TwoDList_20, null);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Data.DataType());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Data.DataType[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_String_0(ref object o)
        {
            return huqiang.Data.DataType.String;
        }

        static StackObject* CopyToStack_String_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.String;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_FakeStruct_1(ref object o)
        {
            return huqiang.Data.DataType.FakeStruct;
        }

        static StackObject* CopyToStack_FakeStruct_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.FakeStruct;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_FakeStructArray_2(ref object o)
        {
            return huqiang.Data.DataType.FakeStructArray;
        }

        static StackObject* CopyToStack_FakeStructArray_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.FakeStructArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_ByteArray_3(ref object o)
        {
            return huqiang.Data.DataType.ByteArray;
        }

        static StackObject* CopyToStack_ByteArray_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.ByteArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Int32Array_4(ref object o)
        {
            return huqiang.Data.DataType.Int32Array;
        }

        static StackObject* CopyToStack_Int32Array_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Int32Array;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_FloatArray_5(ref object o)
        {
            return huqiang.Data.DataType.FloatArray;
        }

        static StackObject* CopyToStack_FloatArray_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.FloatArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Int16Array_6(ref object o)
        {
            return huqiang.Data.DataType.Int16Array;
        }

        static StackObject* CopyToStack_Int16Array_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Int16Array;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Int64Array_7(ref object o)
        {
            return huqiang.Data.DataType.Int64Array;
        }

        static StackObject* CopyToStack_Int64Array_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Int64Array;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_DoubleArray_8(ref object o)
        {
            return huqiang.Data.DataType.DoubleArray;
        }

        static StackObject* CopyToStack_DoubleArray_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.DoubleArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_FakeStringArray_9(ref object o)
        {
            return huqiang.Data.DataType.FakeStringArray;
        }

        static StackObject* CopyToStack_FakeStringArray_9(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.FakeStringArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Int_10(ref object o)
        {
            return huqiang.Data.DataType.Int;
        }

        static StackObject* CopyToStack_Int_10(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Int;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Float_11(ref object o)
        {
            return huqiang.Data.DataType.Float;
        }

        static StackObject* CopyToStack_Float_11(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Float;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Long_12(ref object o)
        {
            return huqiang.Data.DataType.Long;
        }

        static StackObject* CopyToStack_Long_12(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Long;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Double_13(ref object o)
        {
            return huqiang.Data.DataType.Double;
        }

        static StackObject* CopyToStack_Double_13(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Double;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Decimal_14(ref object o)
        {
            return huqiang.Data.DataType.Decimal;
        }

        static StackObject* CopyToStack_Decimal_14(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Decimal;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Struct_15(ref object o)
        {
            return huqiang.Data.DataType.Struct;
        }

        static StackObject* CopyToStack_Struct_15(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Struct;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Class_16(ref object o)
        {
            return huqiang.Data.DataType.Class;
        }

        static StackObject* CopyToStack_Class_16(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.Class;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_StructArray_17(ref object o)
        {
            return huqiang.Data.DataType.StructArray;
        }

        static StackObject* CopyToStack_StructArray_17(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.StructArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_ClassArray_18(ref object o)
        {
            return huqiang.Data.DataType.ClassArray;
        }

        static StackObject* CopyToStack_ClassArray_18(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.ClassArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_TwoDArray_19(ref object o)
        {
            return huqiang.Data.DataType.TwoDArray;
        }

        static StackObject* CopyToStack_TwoDArray_19(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.TwoDArray;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_TwoDList_20(ref object o)
        {
            return huqiang.Data.DataType.TwoDList;
        }

        static StackObject* CopyToStack_TwoDList_20(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.DataType.TwoDList;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Data.DataType();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
